Skip to content

conformance tests: more parallelization#6851

Open
nalind wants to merge 2 commits into
podman-container-tools:mainfrom
nalind:moar-parallelism
Open

conformance tests: more parallelization#6851
nalind wants to merge 2 commits into
podman-container-tools:mainfrom
nalind:moar-parallelism

Conversation

@nalind

@nalind nalind commented May 13, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind failing-test

What this PR does / why we need it:

Parallelize more subtests to try to finish conformance testing faster.
Use t.Cleanup() instead of defer for a few cleanups.

How to verify it

Conformance tests should complete in less time unless they're I/O bound.

Which issue(s) this PR fixes:

Special notes for your reviewer:

The "conformance tests using VFS" job seems to be limited by I/O, as it's not faster when given more memory and more CPU, and actually appears to be slower when we add the parallelization here. The overlay counterpart, however, finishes in less time than it did before.

Does this PR introduce a user-facing change?

None

@nalind nalind force-pushed the moar-parallelism branch 5 times, most recently from 24cc927 to 1879631 Compare May 14, 2026 13:34
@nalind

nalind commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

Looks like that conformance-using-vfs job really is I/O bound.

@nalind nalind force-pushed the moar-parallelism branch 4 times, most recently from b5404bb to 2963718 Compare May 14, 2026 20:49
@nalind nalind marked this pull request as ready for review May 19, 2026 17:27
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 19, 2026
@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor

LGTM

@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor

@nalind looks like you have some conflicts that need to be resolved on this one.

@nalind nalind force-pushed the moar-parallelism branch from 2963718 to bd84bf4 Compare June 10, 2026 22:00

@Honny1 Honny1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have just a possible cleanup comment.

Comment thread tests/conformance/conformance_test.go Outdated
Comment on lines 239 to 259
var eg errgroup.Group
eg.Go(func() error {
if test.contextDir != "" {
getErr = copier.Get("", testDataDir, copier.GetOptions{}, []string{test.contextDir}, pipeWriter)
} else if test.dockerfile != "" {
getErr = copier.Get("", testDataDir, copier.GetOptions{}, []string{test.dockerfile}, pipeWriter)
}
pipeWriter.Close()
wg.Done()
}()
wg.Add(1)
go func() {
return errors.Join(getErr, pipeWriter.Close())
})
eg.Go(func() error {
if test.contextDir != "" || test.dockerfile != "" {
putErr = copier.Put("", contextDir, copier.PutOptions{}, pipeReader)
} else {
putErr = os.Mkdir(contextDir, 0o755)
}
pipeReader.Close()
wg.Done()
}()
wg.Wait()
return errors.Join(putErr, pipeReader.Close())
})
err = eg.Wait()
assert.NoErrorf(t, err, "error copying build info from %q", filepath.Join("testdata", test.dockerfile))
assert.NoErrorf(t, getErr, "error reading build info from %q", filepath.Join("testdata", test.dockerfile))
assert.NoErrorf(t, putErr, "error writing build info to %q", contextDir)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to assert errors immediately in the go routine?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. They're safe to be called outside of the goroutine that's running the test (their require counterparts, not so much).

@nalind nalind force-pushed the moar-parallelism branch from bd84bf4 to 8c8538f Compare June 15, 2026 17:11
nalind added 2 commits June 15, 2026 16:04
Parallelize more subtests.
Use t.Cleanup() instead of "defer" for a few cleanups.
CI: don't run "make all" before making the test target; we fixed the
target dependencies in the Makefile so that targets ensure that what
they need has been built before use.
CI: build the buildah binary for the buildah_version and buildah_info
tasks.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
In cases where we _prefetch an image, don't create a working container
using "--pull" if we only care about the ID of the new container, i.e.,
we don't care that we actually tried to pull the image from the
registry.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@nalind nalind force-pushed the moar-parallelism branch from 8c8538f to 25b063d Compare June 15, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants